#pragma once
#include "hot.hpp"
#include "httplib.h"

extern DataManager *_data;
class Service
{
    private:
        int _server_port;
        string _server_ip;
        string _download_prefix;
        httplib::Server _server;
    private:
        static void Upload(const httplib::Request &req,httplib::Response &rsp);
        static void ListShow(const httplib::Request &req,httplib::Response &rsp);
        static void Download(const httplib::Request &req,httplib::Response &rsp);
        static void GetEtag(BackupInfo &info,string &str);
    public:
        Service();
        bool RunModule();
};